package com.example.dynamicdatasource.service;

import com.example.dynamicdatasource.annotation.DataSource;
import com.example.dynamicdatasource.entities.Teacher;
import com.example.dynamicdatasource.mapper.DemoMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author mqb
 * @date 2021/8/9 20:15
 */
@Service
@DataSource("demo")
public class DemoService {
    @Resource
    DemoMapper demoMapper;

    public Teacher selectOne(Long id) {
        return demoMapper.selectOne(id);
    }
}
